package abstractdemo1;

public abstract class Person {
    private String id;
    private String name;

    // 抽象类也可以有构造方法，作用：创建子类时给属性赋值
    public Person() {

    }

    public Person(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public abstract void work();
}